<!DOCTYPE html>
<html lang="zh">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="ie=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
        <title>{$page_title|default=''} {$config.title|default=$Think.lang.title}</title>
        <meta name="keywords" content="{$config.keywords|default=$Think.lang.copyright}">
        <meta name="description" content="{$config.description|default=$Think.lang.copyright}">
        <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
        {if $config.mourning}{css href="__CSS__/is_mourning.css" /}{/if}
        {css href="__LIB__/lib/weui.min.css,__LIB__/css/jquery-weui.css,__CSS__/common.css,__FONT__/iconfont.css" /}
        {js href="__JS__/ban.js" /}
        {block name="css"}{/block}
    </head>
    <body ontouchstart>
        {block name="body"}{/block}
        <div class="goTop" style="display: none">
            <img src="__IMG__/topup.png" alt="返回顶部">
        </div>
        <div class="weui-footer weui-footer_fixed-bottom">
            <p class="weui-footer__links">
                <a href="https://www.qcwd.com" class="weui-footer__link">{$config.sitename|default=$Think.lang.title}</a>
                <a href="tel:{$config.tel|default=$Think.lang.tel}" class="weui-footer__link">{$config.tel|default=$Think.lang.tel}</a>
            </p>
            <p class="weui-footer__text">Copyright &copy; {$Think.now|date='Y'} {$config.copyright|default=$Think.lang.copyright}</p>
            <div class="divFooter"></div>
        </div>
        <div class="weui-tabbar">
            <a href="#tab1" data-url="/index.html" class="weui-tabbar__item {if $Request.controller eq 'Index'}weui-bar__item--on{/if}">
                <div class="weui-tabbar__icon">
                    <i class="icon iconfont icon-zhuye"></i>
                </div>
                <p class="weui-tabbar__label">首页</p>
            </a>
            <a href="#tab2" data-url="/category.html" class="weui-tabbar__item {if $Request.controller eq 'Category'}weui-bar__item--on{/if}">
                <div class="weui-tabbar__icon">
                    <i class="icon iconfont icon-fenlei"></i>
                </div>
                <p class="weui-tabbar__label">分类</p>
            </a>
            <a href="#tab3" data-url="/flow.html" class="weui-tabbar__item {if $Request.controller eq 'Flow'}weui-bar__item--on{/if}">
                <div class="weui-tabbar__icon">
                    <i class="icon iconfont icon-gouwuche"></i>
                </div>
                <p class="weui-tabbar__label">发现</p>
            </a>
            <a href="#tab4" data-url="/user.html" class="weui-tabbar__item {if $Request.controller eq 'User'}weui-bar__item--on{/if}">
                <div class="weui-tabbar__icon">
                  <i class="icon iconfont icon-wode"></i>
                </div>
            <p class="weui-tabbar__label">我</p>
            </a>
        </div>
    </body>
    {js href="__LIB__/lib/jquery-2.1.4.js,__LIB__/js/jquery-weui.js,__LIB__/lib/fastclick.js,__JS__/jsbridge-mini.js,__JS__/jweixin-1.6.0.js,__FONT__/iconfont.js" /}
    <script type="text/javascript">
        $(function() {
            FastClick.attach(document.body);
        });
        $(function() {
            // var interval = setInterval(function(){
            //     $.post('is_login.html', function(result){
            //         if (result) {
            //             $.alert(result.msg, " 警告！ ", function(){ $(location).attr('href', 'logout.html'); });
            //             clearInterval(interval);//清除任务
            //         }
            //     })
            // }, 5000);
            //导航
            $('.weui-tabbar__item').on('click', function () {
                $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
                $(location).attr('href', $(this).data('url'));//暂时跳转操作
            });
            //返回顶部
            $(document).ready(function(){
                //首先将gotop隐藏
                $(".goTop").hide();
                //当滚动条的位置处于距顶部100像素以下时，跳转链接出现，否则消失
                $(window).scroll(function(){
                    if ($(window).scrollTop()>500){
                        $(".goTop").fadeIn(500);
                    }else{
                        $(".goTop").fadeOut(500);
                    }
                });
                //当点击跳转链接后，回到页面顶部位置
                $(".goTop").click(function(){
                    $('body,html').animate({scrollTop:0},600);
                    return false;
                });
            });
        });
    </script>
    <!-- 百度统计代码 -->
    <script type="text/javascript">
        var _hmt = _hmt || [];
        (function() {
          var hm = document.createElement("script");
          hm.src = "https://hm.baidu.com/hm.js?91d6eb4d54e1dd7eb5185565078f56fd";
          var s = document.getElementsByTagName("script")[0]; 
          s.parentNode.insertBefore(hm, s);
        })();
    </script>
    {block name="js"}{/block}
</html>